package interview.base.writeexam;

public class ExamThird {

    class Super{
        int flag=1;
        public Super() {
               test();
        }
        void test(){
            System.out.println("Super.test() flag="+flag);
        }
    }

    class Sub extends Super{
        public Sub(int i) {
            flag=i;
            System.out.println("Sub.Sub()flag="+flag);
        }
        void test(){
            System.out.println("Sub.test()flag="+flag);
        }
    }

    public static void main(String[] args){
        new ExamThird().new Sub(5);
    }
}
